Comparing Trailing and Copying for Constraint Programming
نویسنده
چکیده
A central service of a constraint programming system is search. In almost all constraint programming systems search is based on trailing, which is well understood and known to be efficient. This paper compares trailing to copying. Copying offers more expressiveness as required by parallel and concurrent systems. However, little is known how trailing compares to copying as it comes to implementation effort, runtime efficiency, and memory requirements. This paper discusses these issues. Execution speed of a copying-based system is shown to be competitive with state-of-the-art trailing-based systems. For the first time, a detailed analysis and comparison with respect to memory usage is made. It is shown how recomputation decreases memory requirements which can be prohibitive for large problems with copying alone. The paper introduces an adaptive recomputation strategy that is shown to speedup search while keeping memory consumption low. It is demonstrated that copying with recomputation outperforms trailing on large problems with respect to both space and time.
منابع مشابه
Reconciling Copying and Trailing for Constraint Programming Systems
Backtracking search is a well-known problem solving technique, which has proven to be successful in particular for constraint solvers. Traditionally, there are two techniques for backtracking: recomputation with copying and trailing. These approaches are basically dual: upon backtracking, recomputation redoes some steps in the search, while trailing undoes some steps. Both techniques have parti...
متن کاملComparing Mixed-Integer and Constraint Programming for the No-Wait Flow Shop Problem with Due Date Constraints
The impetus for this research was examining a flow shop problem in which tasks were expected to be successively carried out with no time interval (i.e., no wait time) between them. For this reason, they should be completed by specific dates or deadlines. In this regard, the efficiency of the models was evaluated based on makespan. To solve the NP-Hard problem, we developed two mathematical mode...
متن کاملAutomatic Implication Checking for CHR Constraint Solvers
Constraint Handling Rules (CHRs) are a high-level rule-based programming language commonly used to define constraint solvers. We present a method for automatic implication checking between constraints of CHR solvers. Our method does not copy the entire constraint store, but performs the check in place using a trailing mechanism. The necessary code enhancements can be done by automatic program t...
متن کاملAutomatic Implication Checking for CHR Constraints
Constraint Handling Rules (CHRs) are a high-level rule-based programming language commonly used to define constraint solvers. We present a method for automatic implication checking between constraints of CHR solvers. Supporting implication is important for implementing extensible solvers and reification, and for building hierarchical CHR constraint solvers. Our method does not copy the entire c...
متن کاملFigaro: Yet Another Constraint Programming Library
Existing libraries and languages for nite domain constraint programming usually have depth-rst search (with branch and bound) built-in as the only search algorithm. Exceptions are the languages claire and Oz, which support the programming of diierent search algorithms through special purpose programming language constructs. The goal of this work is to make abstractions for programming search al...
متن کامل